package ch10_10_3;
public class test{
	/** test this square class */
	public static void main(String[] args){
		//create an array of five geometricObjects
		GeometricObject[] gObject = new GeometricObject[5];
		for(int i=0; i<5; i++){
			gObject[i] = new Square();
		}
		//set colors
		gObject[0].setColor("red");
		gObject[1].setColor("black");
		gObject[3].setColor("green");
		gObject[4].setColor("blue");
		//invoke the howToColor method
		for(int i=0; i<5; i++){
			System.out.print((i+1)+":");
			((Square) gObject[i]).howToColor();
		}
	}
}